# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=fq
pkgver=0.10.0
pkgrel=3
pkgdesc="Tool, language and decoders for inspecting binary data"
url="https://github.com/wader/fq"
license="MIT"
arch="all !ppc64le" # fails tests
makedepends="go"
checkdepends="expect"
options="net"
source="https://github.com/wader/fq/archive/v$pkgver/fq-$pkgver.tar.gz
	enable-cgo.patch"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make fq
}

check() {
	GO_TEST_RACE_FLAGS= make test
}

package() {
	install -Dm755 fq -t "$pkgdir"/usr/bin/
}

sha512sums="
8cc179721de4b8b268dcd41c53b7c689b30574ea9f3c4f796115255b0dd8a2e681f955c2b2a0dc364f4e15aad582ea0a0aa038d4cee7c7bb79f5096d467883a3  fq-0.10.0.tar.gz
0d1857a6ffd0f85a5de0f57a4f2aea521523c4a738a4805cd1c83644610a6ca51684f92db97eeff1e9bddd57800d0e66d2447fa95af25de82a5177c7e4a338cb  enable-cgo.patch
"
